home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / mpmod160.zip / TELEMATE.ZIP / ZMODUP.SCR < prev   
Text File  |  1993-01-01  |  3KB  |  66 lines

  1. ;
  2. ; Telemate Script for the receiving of files.
  3. ;
  4. ; The "-w" switch tells MPModem to "warble" after it has finished (to wake
  5. ; up those sleepy operators :->) but is only available to REGISTERED users
  6. ; (so register).
  7. ;
  8.  
  9. ;
  10. ;Procedure to convert a string of space characters to underline characters
  11. ;
  12.  
  13. PROCEDURE Convert STRING line
  14. INTEGER rr
  15.    WHILE rr <> 0
  16.       STRPOS line," ",rr
  17.       STRSET line,"_",rr,1
  18.       rr = rr + 1
  19.    ENDWHILE
  20. ENDPROC
  21.  
  22.  
  23. STRING param,baud2,port2,dummy,updir,boardname,files,inputitem
  24. INTEGER stat, baud1, port1, xx
  25.  
  26. QUERY Baud,baud1
  27. QUERY Port,port1
  28. QUERY Board,boardname
  29. QUERY DirUpload,updir
  30.  
  31. print "What files to send: "          ; Prompt the user for the filenames
  32. INPUT inputitem                       ; Get the answer from them
  33. files = ""                            ; Set up a null string
  34. CONCAT files,inputitem                ; Removes the backspace. Odd!!!
  35. CLEAR KEY                             ; Clear the key system
  36. IF files = ""                         ; Did the user enter nothing
  37.    print "Script aborted!"            ; Yes, tell them and
  38.    STOP                               ; abort it.
  39. ENDIF
  40.  
  41. xx = 0;
  42. STRPOS files,"\",xx                   ; Check for a pathname in the string
  43. IF xx = 0                             ; Was there a path in there?
  44.    CONCAT updir, files                ; No, so append the files to the upload dir.
  45. ELSE
  46.    updir = files                      ; Yes, so copy the path to the upload dir.
  47. ENDIF
  48.  
  49. param = "mpmodem -sz -c -f -l -w -v -b"   ; Set up the parameter list.
  50. ITOA baud1,baud2                      ; Convert integer baud rate to a string
  51. ITOA port1,port2                      ; Convert integer port rate to a string
  52. CONCAT param, baud2                   ; Add the baud rate to the parameter list
  53. CONCAT param, " -p"                   ; Set up the switch for the port number
  54. CONCAT param, port2                   ; Add the port rate to the parameter list
  55. CONCAT param, " -v"                   ; Set up the switch for the board name
  56. IF NOT CONNECTED                      ; Are we connected to a BBS (or whatever)
  57. boardname = "Offline/Direct_Connect"  ; No, so put a dummy name in
  58. ELSE
  59. Convert boardname                     ; Yes, so grab and convert the name
  60. ENDIF
  61. CONCAT param,boardname                ; Add the boardname to the parameter list
  62. CONCAT param," -t0 "                  ; Put a dummy time in.
  63. CONCAT param, updir
  64.  
  65. DOS param                             ; Run the program.
  66.